<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="java.util.Date"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%
	response.setHeader("Pragma", "no-cache");
	response.setHeader("Cache-Control", "no-cache");
	response.setDateHeader("Expires", 0);
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
	<head>
		<title>文章预览_${article.title}</title>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
		<c:import url="/admin/inc.html" charEncoding="UTF-8"></c:import>
		<link rel="stylesheet" type="text/css" href="/style/style.css" media="all" />
		<script type="text/javascript" src="/script/index.js"></script>
		<script charset="utf-8" src="/script/lib/kindeditor3.5.2/kindeditor.js"></script> 
		<script type="text/javascript" src="/admin/script/article/articlePreview.js" charset="UTF-8"></script>
	</head>
	<body>
		<!-- wrapper -->
		<div class="p_window">
	
		<c:import url="/inc/header.html" charEncoding="UTF-8"></c:import>
		
		<div class="p_main">
			<div class="p_center">
				<input type="hidden" id="articleId" value="${article.id}"/> 
				
				<div class="articleHead">
					<h1 class="title">${article.title}</h1>
					<div class="postTime"><fmt:formatDate value="${article.postTime}" type="both" pattern="yyyy-MM-dd HH:mm"/></div>
					<div class="memo border-radius_4px">${article.memo}</div>
				</div>
				
				<div class="articleContent">
					<c:forEach var="detail" items="${article.detailsPage.pageData}">
						<div class="contentPage box-Shadow border-radius_4px" id="articleDetail_${detail.id}">
							${detail.content}
						</div>
						<div class="detailOperator">
							<a class="btn" href="javascript:ArticlePreview.EditDetail(${detail.id});"><span class="icon icon-edit">&nbsp;</span>修改</a>
							<a class="btn" href="javascript:ArticlePreview.DelDetail(${detail.id});"><span class="icon icon-del">&nbsp;</span>删除</a>
						</div>
					</c:forEach>
				</div>
				
				<div>
					<textarea id="addDetailContent"  class="articleDetailInput"></textarea>
					<a class="btn" href="javascript:void(0);" id="ad-submit"><span class="icon icon-add">&nbsp;</span>添加</a>
				</div>
			</div>
		</div>
		
		<c:import url="/inc/footer.html" charEncoding="UTF-8"></c:import>
	
		</div>
	</body>
</html>